package com.gexiaobao.pigeon.ui.adapter

import androidx.appcompat.widget.AppCompatImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.model.bean.VideoInfoResponse
import com.gexiaobao.pigeon.app.util.ImageLoaderManager

/**
 * @Author      : hxw
 * @Date        : 2023/3/8 11:20
 * @Describe    :
 */
class VideoAdapter : BaseQuickAdapter<VideoInfoResponse.ListInfo, BaseViewHolder>(R.layout.item_video_layout) {

    override fun convert(holder: BaseViewHolder, item: VideoInfoResponse.ListInfo) {
        holder.setText(R.id.tv_video_title, item.tittle)
        holder.setText(R.id.tv_video_content, item.desc)
        val ivVideoPic = holder.getView<AppCompatImageView>(R.id.iv_video_pic)

        ImageLoaderManager.loadRoundImage(context, item.imageUrl, ivVideoPic, 12)
    }
}